Image compression and decompression method capable of encoding and decoding pixel data based on a color conversion method

ABSTRACT

An image compression and decompression method encodes and decodes pixel data based on a color conversion method. Base on the relationships of corresponding color components of two adjacent pixels, the corresponding color components are encoded either by a white and black modification, a down-sampling or an edge modification. Based on the relationships of encoded color components of the two adjacent pixels, the corresponding encoded color components are decoded either by an inverse white and black modification, an up-sampling or an inverse edge modification.

BACKGROUND OF INVENTION

1. Field of the Invention

The present invention relates to an image compression and decompressionmethod for encoding and decoding pixel data, and more particularly, toan image compression and decompression method for encoding and decodingpixel data based on a color conversion method.

2. Description of the Prior Art

In many color-processing applications, it is often necessary to convertdata between two color spaces. A color space is a region in a3-dimensional or higher dimensional vector space. Any basis, such asthree linearly independent 3-dimensional vectors, defines a colorcoordinate system. A commonly used color coordinate system is the R(red), G (green), and B (blue), defined by their center wavelengths.Given one 3-dimensional color coordinate system, other 3-dimensionallinear color coordinate systems may be represented by a 3.times.3matrix. For example, the Y, I, Q color coordinate system is defined interms of R, G, B by the following matrix:

$\begin{bmatrix}Y \\I \\Q\end{bmatrix} = {\begin{bmatrix}0.299 & 0.587 & 0.114 \\{- 0.1678} & {- 0.3313} & 0.5 \\0.5 & {- 0.4187} & {- 0.0813}\end{bmatrix}\begin{bmatrix}R \\G \\B\end{bmatrix}}$

Note that not all color spaces are linear. For example, to better modelthe human visual system, some color conversions attempt to non-linearlyre-scale vectors (e.g., logarithmically). Examples are CIE L*u*v* andL*a*b*.

Different color coordinate systems are defined for various reasons. Forexample, for data to be displayed on monitors, it is convenient for mostdigital color images to use the R, G, B coordinate system, in fixedrange, such as 6 bits per coordinate. If the application requires colorcompression for storing or transmitting large amounts of color imagedata, then the RGB representation is far from optimal. U.S. Pat. No.5,731,988 issued on Mar. 24, 1998 to Zandi et al. discloses a method forreversible color conversion shown by the following matrix:

$\begin{bmatrix}{Ya} \\{Yb} \\{Yc}\end{bmatrix} = {\begin{bmatrix}0.25 & 0.5 & 0.25 \\0 & {- 1} & 1 \\1 & {- 1} & 0\end{bmatrix}\begin{bmatrix}R \\G \\B\end{bmatrix}}$

The luminance component in this representation is:

${Ya} = \frac{R + {2G} + B}{4}$

The chrominance components are:Yb=B−GYc=R−G

Data compression is an extremely useful tool for storing andtransmitting large amounts of data. For example, the time required totransmit an image is reduced drastically when compression is used todecrease the number of bits required to recreate the image. Manydifferent data compression techniques exist in the prior art.Compression techniques can be divided into two broad categories: lossycoding and lossless coding. In lossless compression, all the informationis retained and the data is compressed in a manner that allows forperfect reconstruction. Lossy coding involves coding that results in theloss of information, such that there is no guarantee of perfectreconstruction of the original data. The goal of lossy compression isthat changes to the original data are done in such a way that they arenot objectionable or detectable.

Therefore in lossy compression, what is desired is a color conversionmethod capable of encoding input symbols or intensity data prior toconversion into output data and capable of reconstructing original inputdata from the output data. In the desired color conversion method datacompression is achieved by encoding, which is intended to preserverelevant characteristics of the input data while eliminating lessimportant data.

SUMMARY OF INVENTION

It is therefore a primary objective of the claimed invention to providean image compression and decompression method for encoding and decodingpixel data.

The claimed invention discloses an image compression method for encodingpixel data based on a color conversion method comprising checking if apixel and an adjacent pixel are either black or white; and if one of thepixels is either black or white, performing a white and blackmodification on data of the pixels.

The claimed invention also discloses an image compression method forencoding pixel data comprising checking if a difference of correspondingcolor components of two adjacent pixels is greater than a predeterminedvalue; and if the difference of the color components of the two adjacentpixels is not greater than the predetermined value, down-sampling dataof the color components of the pixels.

The claimed invention also discloses an image compression method forencoding pixel data comprising checking if a difference of correspondingcolor components of two adjacent pixels is greater than a predeterminedvalue; and if the difference of the color components of the two adjacentpixels is greater than the predetermined value, performing an edgemodification by removing least significant bits of data of the colorcomponents of the pixels.

The claimed invention also discloses an image compression method forencoding pixel data comprising checking if a difference of correspondingcolor components of a first pixel and a second pixel adjacent to thefirst pixel is greater than a first predetermined value; checking if adifference of the corresponding color components of a third pixeladjacent to the second pixel, and a fourth pixel adjacent to the thirdpixel is greater than a second predetermined value; checking if adifference of the corresponding color components of the second pixel andthe third pixel is greater than a third predetermined value; and if thedifference of the color components of the first and second pixels isgreater than the first predetermined value, the difference of the colorcomponents of the third and fourth pixels is not greater than the secondpredetermined value, and the difference of the color components of thesecond and third pixels is not greater than the third predeterminedvalue, setting the color component of the second pixel to thecorresponding color component of the third pixel.

The claimed invention discloses an image decompression method fordecoding pixel data comprising checking if two adjacent pixels are blackor white; and if the two adjacent pixels contain a pixel which is eitherblack or white, performing an inverse white and black modification ondata of the pixels.

The claimed invention also discloses an image decompression method fordecoding pixel data comprising checking a pilot bit of two adjacentpixels; and if the pilot bit indicates corresponding color components ofthe two pixels were encoded by down-sampling, generating correspondingchrominance values of the two pixels by an encoded chrominance value ofthe two adjacent pixels.

The claimed invention also discloses an image decompression method fordecoding pixel data comprising checking a pilot bit of the two adjacentpixels; and if the pilot bit indicates corresponding color components ofthe two pixels were encoded by edge modification, generating mostsignificant bits of corresponding chrominance values of the two pixelsaccording to an encoded chrominance value of the two adjacent pixels.

These and other objectives of the present invention will no doubt becomeobvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment that isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a flow chart illustrating a first image compression methodaccording to the present invention.

FIG. 2 is a flow chart illustrating a second image compression methodaccording to the present invention.

FIG. 3 is a flow chart illustrating an image decompression methodaccording to the present invention.

DETAILED DESCRIPTION

Please refer to FIG. 1 for a flow chart illustrating a first imagecompression method according to the present invention. The first imagecompression method includes the following steps:

Step 110: receive RGB data representing red (R), green (G), and blue (B)components of a pixel;

Step 120: generate color components of the pixel according to the red,green, and blue components of the pixel;

Step 130: check if a pixel is either black or white: if one of twoadjacent pixels is either black or white, perform step 140; if the twoadjacent pixels are neither black nor white, perform step 150;

Step 140: perform a white and black modification on data of the pixels;

Step 150: check if the two adjacent pixels contain smooth or sharp colorcomponents; if the two adjacent pixels contain smooth color components,perform step 160; if the two adjacent pixels contain sharp colorcomponents, perform step 170;

Step 160: perform a down-sampling procedure on data of the pixels; and

Step 170: perform an edge modification on data of the pixels.

For ease of explanation, we assume a pixel has an RGB 6/6/6/format, thatis, each of the red, green, and blue components is represented by 6bits. If two adjacent pixels P1 and P2 are stored uncompressed withoutthe present invention method, a 36-bit data width is required forstoring the pixels P1 and P2.

In Step 110, the red, green, and blue components of the pixels P1 and P2are received. Then in step 120, a method disclosed in U.S. Pat. No.5,731,988 is used for converting the red, green, and blue components ofthe pixel P1 or P2 into their corresponding color components:

${{Ya} = \frac{R + {2G} + B}{4}};$ Yb = B − G; Yc = R − G.

The luminance component Ya in the above representation remainsuncompressed and is retained completely in the method shown in FIG. 1,while the chrominance components Yb and Yc are further processed bysteps 130 through 170 and will be discussed in more detail in thefollowing paragraphs. The Ya, Yb and Yc color components obtained from apixel with an RGB 6/6/6/format have data widths of 6 bits, 7 bits and 7bits, respectively. The color components representing the pixel P1 are aluminance component Ya1 and two chrominance components Yb1 and Yc1, andthe color components representing the pixel P2 are a luminance componentYa2 and two chrominance components Yb2 and Yc2.

In Step 130, it is determined, based on its luminance component Yaobtained in step 120, whether a pixel is black or white. For example,the pixel P1 is black when Ya1 equals to 0, and is white when Ya1 equalsto 63; similarly, the pixel P2 is black when Ya2 equals to 0, and iswhite when Ya2 equals to 63. When a pixel is either black or white, itsred, green and blue components are all 0 or 63. Therefore, thechrominance components Yb and Yc are both zero.

In Step 140, the white and black modification is applied to data of thetwo adjacent pixels P1 and P2 when one of the pixels P1 and P2 is eitherblack or white. If the luminance component Ya1 or Ya2 shows that atleast one of the pixels P1 and P2 is either black or white, then thechrominance components of the black or white pixel are set to zero, andthe chrominance components of the other pixel are retained. Since thechrominance components of the other pixel are 0 if it is also a black orwhite pixel, the retained chrominance components will still be zero.

In Step 150, it is determined whether the chrominance components Yb1 andYc1 of the pixels P1 are smooth or sharp with respect to the chrominancecomponents Yb2 and Yc2 of the pixel P2 when both the pixels P1 and P2are neither black nor white. The chrominance components Yb1 and Yb2 aresmooth if a difference between Yb1 and Yb2 is not greater than a firstpredetermined value, and are sharp if a difference between Yb1 and Yb2is greater than the first predetermined value. Similarly, thechrominance components Yc1 and Yc2 are smooth if a difference betweenYc1 and Yc2 is not greater than a second predetermined value, and aresharp if a difference between Yc1 and Yc2 is greater than the secondpredetermined value. The first and the second predetermined can be setto the same or different values.

In Step 160, the down-sampling procedure is applied to data of thepixels P1 and P2 when the pixels P1 and P2 contain smooth colorcomponents. If Yb1 of the pixel P1 and Yb2 of the pixel P2 are smooth,Yb1 and Yb2 are down-sampled by storing an average value of Yb1 and Yb2and a pilot bit is generated to indicate that Yb1 and Yb2 are encoded bythe down-sampling procedure. If Yc1 of the pixel P1 and Yc2 of the pixelP2 are smooth, Yc1 and Yc2 are down-sampled by storing an average valueof Yc1 and Yc2 and a pilot bit is generated to indicate that Yc1 and Yc2are encoded by the down-sampling procedure. In other words, after thedown-sampling procedure, the average of Yb1 and Yb2 represents both Yb1of the pixel P1 and Yb2 of the pixel P2, and the average of Yc1 and Yc2represents both Yc1 of the pixel P1 and Yc2 of the pixel P2. For thepixels P1 and P2 with the RGB 6/6/6/format, a data width of 14 bits isrequired for storing both the chrominance components of the pixels P1and P2 without data compression. However, with the present inventionmethod, a data width of only 8 bits (7 bits for the average of thechrominance components and 1 bit for the pilot bit) is required forstoring both the chrominance components of the pixels P1 and P2 afterthe down-sampling procedure of the present invention, whereby 6 bits canbe reserved for other purposes.

In Step 170, the edge modification is applied to data of the pixels P1and P2 when the pixels P1 and P2 contain sharp color components. If Yb1of the pixel P1 and Yb2 of the pixel P2 are sharp, least significantbits (LSBs) of Yb1 and Yb2 are removed and a pilot bit is set toindicate that Yb1 and Yb2 are encoded with the edge modification. Forexample, if data width of 7 bits is used for storing Yb1 and Yb2, then 4most significant bits (MSBs) of Yb1 and 3 MSBs of Yb1 are retained,while data contained in 3 LSBs of Yb1 and 4 LSBs of Yb2 are removed.Since the most relevant characteristics of an input data are representedby MSBs of the input data, even if the original input data cannot bereconstructed completely from its MSBs after the edge modification, onlyless important data represented by their LSBs is eliminated. The numberof MSBs of each chrominance components to be retained and how they arestored as encoded data can vary in the present invention method.Retaining more MSBs means the reconstructed data is closer to theoriginal data, while retaining fewer MSBs means better data compressionratio. The retained MSBs of Yb1 can be stored as MSBs of the encodeddata and the retained MSBs of Yb2 can be stored as LSBs of the encodeddata, and vice versa.

In the down-sampling procedure in step 160 and the edge modification instep 170, a pilot bit PB is generated for both types of the chrominancecomponents Yb1, Yb2, Yc1 and Yc2 of the pixels P1 and P2. A pilot bit PBindicating that the pixels P1 and P2 have sharp chrominance componentsdoes not necessarily reveal that all the components Yb1, Yb2, Yc1 andYc2 are sharp. It is possible that only Yb1 and Yb2 or only Yc1 and Yc2are sharp. However, both types of the chrominance components Yb1, Yb2,Yc1 and Yc2 of the pixels P1 and P2 can have respective pilot bits PB1and PB2 generated in the down-sampling procedure in step 160 and theedge modification in step 170. The pilot bit PB1 indicates whether thechrominance component Yb1 of the pixel P1 and the chrominance componentYb2 of the pixel P2 are sharp or smooth, and the pilot bit PB2 indicatesthat whether the chrominance component Yc1 of the pixel P1 and thechrominance component Yc2 of the pixel P2 are sharp or smooth. In otherwords, for color components to be encoded with the present inventionmethod, each of the color components can share the same pilot bit, orhas its own corresponding pilot bit.

In Step 150, it is determined whether the pixels P1 and P2 containsmooth or sharp color components based on the first and secondpredetermined values. The first and second predetermined values can beset according to the edge modification in step 170. For example, if Yb1and Yb2 are both 7-bit data, data width of 7 bits is used for storingYb1 and Yb2, and 4 MSBs of Yb1 and 3 MSBs of Yb1 are retained, then adata discrepancy ranging from −7 to 7 (±2³−1) results from removing datacontained in the 3 LSBs of Yb1 and a data discrepancy ranging from −15to 15 (±2⁴−1) results from removing data contained in the 4 LSBs of Yb2.Therefore, the first predetermined value can be set to 7 and the secondpredetermined values can be set to 15, or both the first and the secondpredetermined values can be set to 15. The first and secondpredetermined values can also be set in a different way in otherapplications.

Please refer to FIG. 2 for a flow chart illustrating a second imagecompression method according to the present invention. The second imagecompression method includes following steps:

Step 210: receive RGB data representing red, green, and blue componentsof a pixel;

Step 220: generate color components of the pixel according to the red,green, and blue components of the pixel;

Step 230: check if a pixel is either black or white: if one of twoadjacent pixels is either black or white, perform step 240; if the twoadjacent pixels are neither black nor white, perform step 250;

Step 240: perform a white and black modification on data of the pixels;

Step 250: check if the two adjacent pixels contain a smooth or sharpcolor component; if the two adjacent pixels contain a smooth colorcomponent, perform step 260; if the two adjacent pixels contain a sharpcolor component, perform step 270;

Step 260: perform a down-sampling procedure on data of the pixels; and

Step 270: perform an advanced edge modification on data of the pixels.

FIG. 2 differs from FIG. 1 in that in step 270 the advanced edgemodification is performed instead of the edge modification of step 170.The advanced edge modification in step 270 is applied to fourconsecutive pixels P1, P2, P3, P4. If Yb1 of the pixel P1 and Yb2 of thepixel P2 are sharp, a chrominance component Yb3 of the pixel P3 and achrominance component Yb4 of the pixel P4 are smooth, and Yb2 of thepixel P2 and Yb3 of the pixel P3 are smooth, then Yb2 is updated to Yb3followed by removing LSBs of Yb1 and the updated Yb2, and by setting apilot bit indicating that the pixels P1 and P2 are processed with theadvanced edge modification. Predetermined values used to identifywhether the color components of the pixels P1 and P2, the pixels P3 andP4, and the pixels P2 and P3 are sharp or smooth respectively can havethe same or different values.

If the two adjacent pixels P1 and P2 are encoded with the presentinvention methods shown in FIG. 1 or FIG. 2, luminance components Ya1and Ya2, an encoded chrominance input DYb representing Yb1 and Yb2 ofthe pixels P1 and P2, and an encoded chrominance input DYc representingYc1 and Yc2 of the pixels P1 and P2 are generated. Data components Ya1,Ya2, DYb and DYc have to be decoded before being sent to another system.Please refer to FIG. 3 for a flow chart illustrating an imagedecompression method according to the present invention. The imagedecompression method includes following steps:

Step 310: receive data components of a pixel;

Step 320: check if two adjacent pixels are either black or white; if oneof two adjacent pixels is either black or white, perform step 330; ifthe two adjacent pixels are neither black nor white, perform step 340;

Step 330: perform an inverse white and black modification on data of thepixels; perform step 370;

Step 340: check a pilot bit of the two adjacent pixels; if the pilot bitindicates corresponding color components of the two pixels were encodedby a down-sampling procedure, perform step 350; if the pilot bitindicates the corresponding color components of the two pixels wereencoded by an edge modification or an advanced edge modification,perform step 360;

Step 350: perform an up-sampling procedure on data of the pixels;perform step 370;

Step 360: perform an inverse edge modification on data of the pixels;and

Step 370: generate RGB data representing the red, green, and bluecomponents of the pixel.

After the data components Ya1, Ya2, DYb and DYc are received in step310, in step 320 it is determined whether the pixels P1 and P2 areeither white or black. Since the luminance components Ya1 and Ya2 of thepixels P1 and P2 are retained completely in the methods shown in FIG. 1and FIG. 2, the pixel P1 is black when Ya1 equals to 0, and is whitewhen Ya1 equals to 63; similarly, the pixel P2 is black when Ya2 equalsto 0, and is white when Ya2 equals to 63.

In Step 330, the inverse white and black modification is applied to datacomponents of the pixels P1 and P2 when one of the pixels P1 and P2 iseither black or white. If Ya1 indicates that the pixel P1 is eitherblack or white, reconstructed chrominance components Yb1′ and Yc1′ ofthe pixel P1 are generated by setting both Yb1′ and Yc1′to zeros, andreconstructed chrominance components Yb2′ and Yc2′ of the pixel P2 aregenerated according to DYb and DYc respectively. Similarly, if Ya2indicates that the pixel P2 is either black or white, the reconstructedchrominance components Yb2′ and Yc2′ of the pixel P2 are generated bysetting both Yb2′ and Yc2′to zeros, and the reconstructed chrominancecomponents Yb1′ and Yc1′ of the pixel P1 are generated according to DYband DYc respectively.

In Step 340, the pilot bit of the pixels P1 and P2 is checked. If thechrominance components Yb1, Yb2, Yc1 and Yc2 share a same pilot bit PB,the reconstructed chrominance component Yb1′, Yb2′, Yc1′ and Yc2′ aregenerated according to the pilot bit PB. If the chrominance componentsYb1, Yb2 and the chrominance components Yc1, Yc2 have respective pilotbits PB1 and PB2, the reconstructed chrominance components Yb1′ and Yb2′are generated according to the pilot bit PB1, and the reconstructedchrominance components Yc1′ and Yc2′ are generated according to thepilot bit PB2.

In Step 350, the up-sampling procedure is applied to the data componentsof the pixels P1 and P2 when the pilot bit indicates corresponding colorcomponents of the two pixels were encoded by the down-samplingprocedure. The up-sampling procedure generates the reconstructedchrominance components Yb1′ and Yb2′ of the pixels P1 and P2 by settingboth Yb1′ and Yb2′ to the value of DYb, and generates the reconstructedchrominance components Yc1′ and Yc2′ of the pixels P1 and P2 by settingboth Yc1′ and Yc2′ to the value of DYc. Consequently, Yb1′ and Yb2′ willhave the same value after the up-sampling procedure. Also, Yc1′ and Yc2′will have the same value after the up-sampling procedure.

In Step 360, the inverse edge modification is applied to the datacomponents of the pixels P1 and P2 when the pilot bit indicatescorresponding color components of the two pixels were encoded by theedge modification or the advanced edge modification. If the retainedMSBs of Yb1 are stored as MSBs of the encoded chrominance input DYb andthe retained MSBs of Yb2 are stored as LSBs of the encoded chrominanceinput DYb, MSBs of the reconstructed chrominance component Yb1′ of thepixel P1 are generated according to MSBs of DYb, and MSBs of thereconstructed chrominance component Yb2′ of the pixel P2 are generatedaccording to LSBs of DYb. Similarly, if the retained MSBs of Yc1 arestored as MSBs of the encoded chrominance input DYc and the retainedMSBs of Yc2 are stored as LSBs of the encoded chrominance input DYc,MSBs of the reconstructed chrominance component Yc1′ of the pixel P1 aregenerated according to MSBs of DYc, and MSBs of the reconstructedchrominance component Yc2′ of the pixel P2 are generated according toLSBs of DYc. For example, if the 4 MSBs of Yb1 are retained in the MSBsof the DYb and the 3 MSBs of Yb2 are retained in the LSBs of the DYb,reconstructed chrominance component Yb1′ of the pixel P1 is generated bysetting its MSBs according to the 4 MSBs of DYb and setting its LSBs tozeros or other values, and reconstructed chrominance component Yb2′ ofthe pixel P2 is generated by setting its MSBs according to the 3 LSBs ofDYb and setting its LSBs to zeros or other values.

In Step 370, reconstructed RGB data of a pixel is generated from itsluminance component and reconstructed chrominance components obtained insteps 320, 340 or 350 with the following formulae:

${G^{\prime} = {{Ya} - \left\lfloor \frac{{Yb}^{\prime} + {Yc}^{\prime}}{4} \right\rfloor}};$R^(′) = Yc^(′) + G^(′); B^(′) = Yb^(′) + G^(′).

With the image compression and decompression method of the presentinvention, RGB data of a pixel can be compressed and transmitted asencoded data in an efficient way. After transmission, the encoded datacan be decoded and data containing most relevant characteristics of theoriginal data can be generated. The embodiments described aboveillustrate but do not limit the present invention. The present inventionis not limited to the particular numbers of bits described above, or tothe color conversion methods in steps 120, 220 and 370. The presentinvention can be implemented by software programmable computerprocessors and is particularly suitable for image compression for mobilephone thin film transistor (TFT) driver integrated circuits.

Those skilled in the art will readily observe that numerousmodifications and alterations of the device and method may be made whileretaining the teachings of the invention. Accordingly, the abovedisclosure should be construed as limited only by the metes and boundsof the appended claims.

1. A computer implemented method for encoding pixel data comprising:checking if a pixel and an adjacent pixel are either black or white; ifone of the pixels is either black or white, performing a white and blackmodification on data of the pixels by equalizing red, green and bluecomponents of the pixel which is either black or white; checking if adifference of a color component of the pixel and a same color componentof the adjacent pixel is greater than a predetermined value; if thedifference of the color components of the two adjacent pixels is notgreater than the predetermined value, generating an average of the colorcomponents of the pixels and generating a pilot bit; and if thedifference of the color components of the two adjacent pixels is greaterthan the predetermined value, removing least significant bits (LSBs) ofdata of the color components of the pixels and generating a pilot bit.2. The computer implemented method of claim 1 further comprisingconverting data of the pixels to generate color components of thepixels.
 3. The computer implemented method of claim 1 wherein performinga white and black modification on data of the pixels further comprisesremoving data of a color component of the pixel which is either black orwhite and retaining data of a corresponding color component of theadjacent pixel.
 4. A computer implemented method for encoding pixel datacomprising: checking if a difference of corresponding color componentsof two adjacent pixels is greater than a predetermined value; if thedifference of the color components of the two adjacent pixels is notgreater than the predetermined value, down-sampling data of the colorcomponents of the pixels and generating a pilot bit corresponding todown-sampling; checking if the pixels are black or white one-by-one, andif the pixels contain a black or white pixel, performing a white andblack modification on data of the pixels by equalizing red, green andblue components of the pixel which is either black or white.
 5. Thecomputer implemented method of claim 4 wherein performing a white andblack modification on data of the pixels further comprises removing dataof the color component of the pixel which is either black or white andretaining data of the corresponding color component of the adjacentpixel.
 6. The computer implemented method of claim 4 further comprisingconverting data of the pixels to generate the color components of thepixels.
 7. The computer implemented method of claim 4 whereindown-sampling data of the color components of the pixels is generatingan average of the color components of the pixels.
 8. A computerimplemented method for encoding pixel data comprising: checking if adifference of corresponding color components of a first pixel and asecond pixel adjacent to the first pixel is greater than a predeterminedvalue; if the difference of the color components of the first and secondpixels is greater than the predetermined value, performing an edgemodification by removing least significant bits (LSBs) of data of thecolor components of the pixels and generating a pilot bit correspondingto removing the LSBs; and checking if the pixels are black or whiteone-by-one, and if the pixels contain a black or white pixel, performinga white and black modification on data of the pixels by equalizing red,green and blue components of the pixel which is either black or white.9. The computer implemented method of claim 8 wherein performing a whiteand black modification on data of the pixels further comprises removingdata of the color component of the pixel which is either black or whiteand retaining data of the corresponding color component of the adjacentpixel.
 10. The computer implemented method of claim 8 further comprisingconverting data of the pixels to generate the color components of thepixels.
 11. The computer implemented method of claim 8 furthercomprising: checking if a difference of the corresponding colorcomponents of a third pixel adjacent to the second pixel, and a fourthpixel adjacent to the third pixel is greater than a second predeterminedvalue; checking if a difference of the corresponding color components ofthe second pixel and the third pixel is greater than a thirdpredetermined value; and if the difference of the color components ofthe first and second pixels is greater than the first predeterminedvalue, the difference of the color components of the third and fourthpixels is not greater than the second predetermined value, and thedifference of the color components of the second and third pixels is notgreater than the third predetermined value, setting the color componentof the second pixel to the corresponding color component of the thirdpixel.
 12. The computer implemented method of claim 11 furthercomprising down-sampling data of the color components of the third andfourth pixels.
 13. The computer implemented method of claim 12 whereindown sampling data of the color components of the third and fourthpixels is generating an average of the color components of the third andfourth pixels.
 14. The computer implemented method of 12 furthercomprising generating a pilot bit corresponding to down-sampling. 15.The computer implemented method of claim 11 wherein the first, secondand third predetermined values are the same.